package com.lm.controller;

import com.lm.service.KwLoseUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.text.SimpleDateFormat;

@Controller
@RequestMapping("kwLoseUser")
public class KwLoseUserController {
    @Autowired
    private KwLoseUserService kwLoseUserService;

    @RequestMapping(value = "/totalCount", method = RequestMethod.GET)
    @ResponseBody
    public int totalCount(String beginTime, String endTime) {
        SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        int count = 0;
        count = kwLoseUserService.getByDate(beginTime, endTime);
        return count;
    }
}
